package JLB_Chapter_07;

// code_07_03
public class Restaurant3 {
    public static void main(String[] args) {
        Cook2 cook2 = new Cook2();
        System.out.println("我要一份鱼香肉丝");
        cook2.cooking("鱼香肉丝");
        System.out.println("你们的厨师叫什么名字？");
//        System.out.println(cook2.name);
        System.out.println("请切一点葱花。");
//        cook2.cutOnion();
    }
}

class Cook2 {
    private String name;

    public Cook2() {
        this.name = "Tom Cruise";
    }

    private void cutOnion() {
        System.out.println(name + "切葱花");
    }

    private void washVegetables() {
        System.out.println(name + "洗蔬菜");
    }

    void cooking(String dish) {
        washVegetables();
        cutOnion();
        System.out.println(name + "开始烹饪" + dish);
    }
}
